package Text.Text2;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/*
 *@Student 张策
 */
//public class Main {
//    public static void main(String[] args) {
//        Main n1 = new Main();
//        n1.io();
//    }
//    public void io(){
//        int num;
//        FileReader fileReader=null;
//        String str="e:\\T5.txt";
//        try {
//            fileReader = new FileReader(str);
//            while(((num=fileReader.read())!=-1)){
//                System.out.print((char) num);
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }
//}
public class Main {
    public static void main(String[] args) {
        Main n1 = new Main();
        n1.io();
    }
    public void io(){
        char[]buf=new char[8];
        int num;
        FileReader fileReader=null;
        String str="e:\\T5.txt";
        try {
            fileReader = new FileReader(str);
            while(((num=fileReader.read(buf))!=-1)){
                System.out.println(num);
                System.out.println(new String(buf,0,num));
            }
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fileReader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
